package org.phoenixframework.common.entity.pms;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.phoenixframework.common.entity.base.BaseEntity;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * <p>
 * pms-商品信息
 * </p>
 *
 * @author doublelife
 * @since 2021-07-18
 */
@Document(indexName = "pms", type = "product", shards = 1, replicas = 0)
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("pms_product")
@ApiModel(value = "Product对象", description = "pms-商品信息")
public class PmsProduct extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Id
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Field(analyzer = "ik_max_word", type = FieldType.Text)
    @ApiModelProperty(value = "商品名字")
    @TableField("name")
    private String name;


}
